package(
    default_visibility = ["//:android_cuttlefish"],
)

cc_binary(
    name = "fec",
    srcs = [
        "libfec/avb_utils.cpp",
        "libfec/avb_utils.h",
        "libfec/fec_open.cpp",
        "libfec/fec_private.h",
        "libfec/fec_process.cpp",
        "libfec/fec_read.cpp",
        "libfec/fec_verity.cpp",
        "libfec/include/fec/ecc.h",
        "libfec/include/fec/io.h",
        "libcrypto_utils/include/crypto_utils/android_pubkey.h",
        "libutils/include/utils/Compat.h",
        "squashfs_utils/squashfs_utils.h",
        "verity/fec/image.cpp",
        "verity/fec/image.h",
        "verity/fec/main.cpp",
    ],
    includes = [
        "libcrypto_utils/include",
        "libfec/include",
        "libutils/include",
        "squashfs_utils",
    ],
    copts = [
        "-DFEC_NO_KLOG",
        "-DNDEBUG",
        "-Wno-private-header",
        "-Wno-vla-cxx-extension",
    ],
    deps = [
        "@avb//:libavb",
        "@boringssl//:crypto",
        "@fec_rs//:libfec_rs",
        "//libbase",
        "//libext4_utils",
        "//libsparse",
    ],
)
